@echo off

if "%JAVA_HOME%" == "" goto no_javahome

if not exist "%JAVA_HOME%\bin\java.exe" goto no_javaexe

if "%JME3_HOME%"=="" goto no_jme3

java -cp "bloxel.jar;libs/*;%JME3_HOME%/jMonkeyEngine3.jar" de.bloxel.Main
goto end

:no_javahome
echo ERROR: JAVA_HOME not found in your environment.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
pause
goto end

:no_javaexe
echo ERROR: JAVA_HOME is set to an invalid directory.
echo JAVA_HOME = "%JAVA_HOME%"
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
pause
goto end

:no_jme3
echo ERROR: JME3_HOME not found in your environment.
echo Please set the JME3_HOME variable in your environment to match the
echo location of your jMonkeyEngine3 installation
pause
goto end

:end
